<?php
abstract class share_public extends ml_controller{

    protected $_page=1;                                    //默认第0页
    protected $_begin=0;
    protected $_uid;
    protected $total;
    protected $finnal=array();
    protected $Acontent=array();
    protected $nickname;
    protected $deletetype;
    protected $userData;
    
    public function initParam()    {
        
        $tmp=$this->input('page','G');
        $this->_page = empty($tmp)?$this->_page:$tmp;//页
        $this->_begin =($this->_page-1)*(ML_FEED_PAGESIZE * 3);
        $this->_uid = intval($this->input('uid','G'));//获取被查看人的uid
        
        
    }
    
    public function init_share(){
    
        
        $this->deletetype="deleteType=1";
        $last=$this->total['num']-($this->_page-1)* ML_FEED_PAGESIZE * 3 <=ML_FEED_PAGESIZE?true:false;
      
        
        $this->set_scope_var('$totalPage', floor($this->total['num']/(ML_FEED_PAGESIZE * 3)+1));//总页数
        $this->set_scope_var('$currentPage', intval($this->_page));//当前页
        $this->set_scope_var('$segment', 1);
        $this->set_scope_var('$lastSegment', $last);
        
        
        $obizUser = ml_biz_user_getinfo::get_instance();
        $obizUser->initUser($this->_uid,$this->__visitor['uid']);        
        $this->userData=$obizUser->getUserArea();
       
        $this->set_scope_var('$skilltags',$this->userData['skill_tags']);
        
        //    右下角拼出xx关注的人的Html        
        $oIFollow = new ml_biz_module_iFollow();
        $this->finnal['iFollow'] = $oIFollow->getList($this->_uid,$this->__visitor['uid']);    
        $this->finnal['pins']=$this->Acontent;        
        $this->finnal['owner_uid']=$this->_uid;
        $this->finnal=array_merge($this->finnal,$this->userData);
       
       
    }
    public function checkParam() {
        if(empty($this->_uid))
        {
            $this->_uid = $this->__visitor['uid'];
        }
        if (empty($this->_uid)){//既没登录又没穿uid跳登录页
            $this->redirect('/page/login.php');
        }
        $this->init_owner($this->_uid);

    }
    


}